<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习</title>

  <style>
    #i1{color: green}
    #i3,.c1{color: yellow}
    .c1,#i2,input[type="text"]{background-color: red}
    body>div>div>p{color: pink}
    div>div>p{background-color: yellow}
    a:link{color: green}
    a:visited{color: red}
    a:hover{color: yellow}
    a:active{color: pink}
  </style>

</head>
<body>

<ul>
  <li>刘备</li>
  <li id="i1">关羽</li>
  <li id="i3">张飞</li>
</ul>
<p id="i2">香蕉</p>
<p class="c1">苹果</p>
<input type="text">
<input type="password">
<div>
  <p>p1</p>
  <div>
    <p>p2</p>
  </div>
  <div>
    <div>
      <p>p3</p>
    </div>
  </div>
</div>
<a href="http://www.youku.com">优酷</a>

</body>
</html>